package hom.services;

import org.imgscalr.Scalr;
import org.springframework.stereotype.Service;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;


@Service
public class Resizer {
    public BufferedImage scale(BufferedImage in, int w, int h) {
        return Scalr.resize(in, Scalr.Method.SPEED, Scalr.Mode.FIT_EXACT,
                w, h, Scalr.OP_ANTIALIAS);
    }


}
